package app.domain.server.util;

import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

import app.domain.server.heartbeat.ClientHeartbeatListener;
import app.domain.server.heartbeat.ServerHeartbeat;

public class ClientData {
	private ObjectInputStream in;
	private ObjectOutputStream out;
	private MessageOutBox messageBox;
	private ClientHeartbeatListener heartListener;
	private ServerHeartbeat heartbeat;
	private boolean alive;

	public ClientData(ObjectInputStream in, ObjectOutputStream out, MessageOutBox messageBox, ClientHeartbeatListener heartListener,ServerHeartbeat heartbeat) {
		this.in = in;
		this.out = out;
		this.messageBox = messageBox;
		this.heartbeat = heartbeat;
		this.heartListener = heartListener;
		this.alive = true;
	}
	
	public ObjectInputStream getIn() {
		return in;
	}
	public ObjectOutputStream getOut() {
		return out;
	}
	public MessageOutBox getMessageOutBox() {
		return messageBox;
	}
	public ClientHeartbeatListener getHeartListener() {
		return heartListener;
	}
	public ServerHeartbeat getServerHeartbeat() {
		return heartbeat;
	}
	
	public boolean isAlive() {
		return alive;
	}

	public void setAlive(boolean alive) {
		this.alive = alive;
	}
	
}
